home *** CD-ROM | disk | FTP | other *** search
- global DBPath
-
- on exitFrame me
- db = DGOpenDatabase(DBPath & "FlyBox.mdb", 0, 0, ";PWD=StopLooking")
- rs = DGCreateRecordset("SELECT Major.* FROM Major ORDER BY Major", db)
- a = 0
- repeat while not DGRSisEOF(rs)
- setVariable(sprite(1), "Main" & a & "_Main", DGRSGetFieldValue("Major", rs))
- DGRSmoveNext(rs)
- a = a + 1
- end repeat
- DGRSClose(rs)
- rs = DGCreateRecordset("SELECT Minor.* FROM Minor LEFT JOIN Major ON Minor.MajorID = Major.MajorID ORDER BY Major, MinorType", db)
- a = 0
- b = 0
- MajorID = 0
- repeat while not DGRSisEOF(rs)
- if (DGRSGetFieldValue("MajorID", rs) <> MajorID) and (MajorID <> 0) then
- a = a + 1
- b = 0
- end if
- MajorID = DGRSGetFieldValue("MajorID", rs)
- setVariable(sprite(1), "Minor_" & a & "_" & b, DGRSGetFieldValue("MinorType", rs))
- setVariable(sprite(1), "MinorID_" & a & "_" & b, DGRSGetFieldValue("MinorID", rs) & EMPTY)
- DGRSmoveNext(rs)
- b = b + 1
- end repeat
- DGRSClose(rs)
- rs = DGCreateRecordset("SELECT TOP 1 Registration.* FROM Registration", db)
- setVariable(sprite(1), "FirstName", DGRSGetFieldValue("FirstName", rs))
- setVariable(sprite(1), "Surname", DGRSGetFieldValue("Surname", rs))
- setVariable(sprite(1), "Address", DGRSGetFieldValue("Address", rs))
- setVariable(sprite(1), "EMail", DGRSGetFieldValue("EMail", rs))
- setVariable(sprite(1), "Password", DGRSGetFieldValue("Password", rs))
- setVariable(sprite(1), "AffiliationID", DGRSGetFieldValue("AffiliationID", rs))
- setVariable(sprite(1), "AffiliationPassword", DGRSGetFieldValue("AffiliationPassword", rs))
- setVariable(sprite(1), "ReceiveInfo", DGRSGetFieldValue("ReceiveInfo", rs) & EMPTY)
- setVariable(sprite(1), "Trusted", DGRSGetFieldValue("Trusted", rs) & EMPTY)
- setVariable(sprite(1), "Cookie", DGRSGetFieldValue("StoreCookie", rs) & EMPTY)
- DGRSClose(rs)
- DGClose(db)
- DGSetRegVal("HKEY_LOCAL_MACHINE", "SOFTWARE\FlyBox", "AppPath", the applicationPath)
- sprite(1).goToFrame("Categories")
- go("Finished")
- end
-